package com.dldata.devtools30.repository.devtexcel;


import com.dldata.devtools30.entity.DevtExcelLogEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**

 */
@Repository
public interface DevtExcelLogDao extends com.dldata.devtools30.repository.BaseRepository<DevtExcelLogEntity,String>, JpaSpecificationExecutor<DevtExcelLogEntity> {
        
        @Query("select t from DevtExcelLogEntity t ")
        public List<DevtExcelLogEntity> getAllFormType();


        @Query("select f from DevtExcelLogEntity f where f.id = ?1  ")
        public DevtExcelLogEntity getById(String id);

        @Query("select f.id as id,   f.costdatatime as costdatatime ,f.excelId as excelId,f.fileNameOrg as fileNameOrg,f.fileLength as fileLength,f.importTime as importTime,f.username as username,f.status as status from DevtExcelLogEntity f where f.excelId = ?1 and f.costdatatime= ?2  ")
        List<Map<String,Object>> findbyCostdataTime(String excelId, Date date);
}
